package com.sbpm.crmbpm.client.services;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.sbpm.crmbpm.shared.data.client.Company;
import com.sbpm.crmbpm.shared.data.client.Segment;
import com.sencha.gxt.data.shared.loader.PagingLoadResult;

import java.util.List;

@RemoteServiceRelativePath("rpc/companyManagement")
public interface CompanyManagement extends RemoteService
{

    PagingLoadResult<Company> findCompanies( String value, int offset, int limit );

    List<Company> findCompanies( String name, String legalName, String inn, String ogrn, String kpp, Segment segment );

    Long createCompany( Company company );

    Company findById( Long id );

    Company findCompanyWithAllAttributes( Long id );

    void updateCompany( Company company );

    void saveCompany( Company company );
}
